package com.lzh.others.basejava.Exception_12;

/**
 * @author by lzh
 * @Classname RethrowNew
 * @Description 12.6.2 可能会有这种场景，捕获异常后抛出另外一种异常
 * @Date 2022/6/29 23:18
 */
public class RethrowNew {
    public static void f() throws OneException {
        System.out.println("Originating the exception in f()");
        throw new OneException("thrown from f()");
    }
}

class OneException extends Exception {
    public OneException(String s) {
        super(s);
    }
}

class TwoException extends Exception {
    public TwoException(String message) {
        super(message);
    }
}
